package com.ztej.query.views.pullableview;

import android.app.Activity;
import android.os.Handler;
import android.os.Message;



public class MyListener implements PullToRefreshLayout.OnRefreshListener
{

//	private Activity activity;
////
//	public MyListener(Activity activity) {
//		this.activity = activity;
//	}


	@Override
	public void onRefresh(final PullToRefreshLayout pullToRefreshLayout)
	{
		// ����ˢ�²���
		new Handler()
		{
			@Override
			public void handleMessage(Message msg)
			{
				// ǧ������˸��߿ؼ�ˢ�������Ŷ��
				pullToRefreshLayout.refreshFinish(PullToRefreshLayout.SUCCEED);
//				activity.getContacts(1, activity.getIntent().getStringExtra("fid"));
//				activity.getIntent().getStringExtra("fid");
			}
		}.sendEmptyMessageDelayed(0, 3000);
	}

	@Override
	public void onLoadMore(final PullToRefreshLayout pullToRefreshLayout)
	{
		// ���ز���
		new Handler()
		{
			@Override
			public void handleMessage(Message msg)
			{
				// ǧ������˸��߿ؼ����������Ŷ��
				pullToRefreshLayout.loadmoreFinish(PullToRefreshLayout.SUCCEED);
			}
		}.sendEmptyMessageDelayed(0, 3000);
	}

}
